Geometric Arithmetic
QuickDraw GX provides six different arithmetic operations that you can perform on geometric shapes. These operations are: intersection, union, difference, reverse difference, exclusion, and inversion. With these operations, you can
Figure 4-14 illustrates the first five of these arithmetic operations.
- find the intersection of two rectangles
- find the union of two rectangles
- find the area common to two shapes
- find the combined area of by two shapes
- find the area covered by one shape that is not also covered by another
- find the area covered by one shape or another, but not both
- find the area not covered by a shape
Figure 4-14 Geometric arithmetic with two solid shapes
Figure 4-14 shows geometric arithmetic with two solid shapes. You can also perform some geometric arithmetic on a filled shape and a solid shape, as shown in Figure 4-15.
Figure 4-15 Geometric arithmetic with a framed shape and a solid shape
Figure 4-16 illustrates the geometic inversion--the area not covered by a shape. The inverted shape extends to the limits of its clip shape or the limits of the view port to which it is drawn.
Figure 4-16 Geometric inversion
For programming examples of geometric arithmetic, see "Performing Geometric Arithmetic With Shapes" beginning on page 4-60.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help